<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Document</title>
	<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/css/style.css" />
	<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/menu.js"></script>
	<style type="text/css">
		table{
			width: 100%;
			margin-left: auto;
			text-align: center;
			margin-right: auto;
		}
		table th{
			background-color: #11B6B6;
			color: white;
			font-family: "微软雅黑";
		}
	</style>
</head>
<body>
	<div class="right-nav">
		<ul>
			<li><img src="__PUBLIC__/Admin/images/home.png"></li>
				<li style="margin-left:25px;">您当前的位置：</li>
				<li><a href="__MODULE__/User/index">用户管理</a></li>
				<!-- <li>></li>
				<li><a href="#">最新公告</a></li> -->
		</ul>
	</div>
	<form action="__URL__/index" method="post">
		共有<span style="color: red;">{$limits.num}</span>个用户<span> | 筛选　</span>
		<label><input name="is_forbidden" type="checkbox" value="1" <?php echo isset($limits['is_forbidden'])?'checked':'' ?> />冻结　</label> 
		<label><input name="is_vip" type="checkbox" value="1" <?php echo isset($limits['is_vip'])?'checked':'' ?> />VIP　</label> 
		<label><input name="is_seller" type="checkbox" value="1" <?php echo isset($limits['is_seller'])?'checked':'' ?> />商家　</label> 
		<lable>创建日期：<input type="date" name="create_time1" value="<?php 
			if(isset($limits['create_time'])){
				if(is_array($limits['create_time'][0])) {
					echo date('Y-m-d',$limits['create_time'][0][1]);
				}else if($limits['create_time'][0]=='gt'){
					echo date('Y-m-d',$limits['create_time'][1]);
				}
			}
		?>"> -- <input type="date" name="create_time2" value="<?php 
			if(isset($limits['create_time'])){
				if(is_array($limits['create_time'][0])) {
					echo date('Y-m-d',$limits['create_time'][1][1]-86400);
				}else if($limits['create_time'][0]=='lt'){
					echo date('Y-m-d',$limits['create_time'][1]-86400);
				}
			}
		?>"></lable>
	<!-- 关键字 -->
		　关键字 <input type="text" name="keyword" size="15" value="<?php echo isset($keyword)?$keyword:'' ?>">
		<input type="submit" value=" 搜索 " class="button">
	</form>
	<table  id="tab">
		<tr>
			<th>用户</th>
			<th>冻结</th>
			<th>VIP</th>
			<th>商家</th>
			<th>注册时间</th>
			<th>最后登录时间</th>
			<th colspan="3">操作</th>
		</tr>
		<foreach name="users" item="user">
			<tr>
				<td>{$user.user_name}</td>
				<td><img src="__PUBLIC__/Admin/images/{$user['is_forbidden']?'yes':'no'}.gif" alt=""></td>
				<td><img src="__PUBLIC__/Admin/images/{$user['is_vip']?'yes':'no'}.gif" alt=""></td>
				<td><img src="__PUBLIC__/Admin/images/{$user['is_seller']?'yes':'no'}.gif" alt=""></td>
				<td>{$user.create_time}</td>
				<td>{$user.last_time}</td>
				<td><a href="__MODULE__/News/write/user_id/{$user.user_id}">通知</a></td>
				<td><a href="__URL__/edit/user_id/{$user.user_id}">详细</a></td>
				<td><a href="__URL__/delete/user_id/{$user.user_id}" onclick="JavaScript: return confirm('你确定要删除吗?')">删除</a></td>
			</tr>
		</foreach>
		<tr><td colspan="9">{$pageinfo}</td></tr>
	</table>
</body>
</html>
<script>
	$("tr:last-child a").click(function(){
		var url=$(this).attr('href');
		$(this).attr('href','javascript:void(0);');
		$("form").attr('action',url).submit();
	});
</script>